package com.itheima.web;

import com.itheima.service.UserService;
import com.ithiema.pojo.User;
import jdk.nashorn.internal.ir.annotations.Reference;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/user")
public class UserController {
    @Reference
    private UserService userService;
    @RequestMapping("/findAll")
    public List<User> findAll(){
        List<User> userList=userService.findAll();
        return userList;
    }
}
